package org.keyroy.map_editor.map.m;

import org.keyroy.tag.Tag;
import org.keyroy.tag.XmlSupport;

public  class BuildingMark implements XmlSupport {
	public int sID;
	public boolean isHide;
	public MapRect mapPoint = new MapRect();

	public BuildingMark() {
	}

	public BuildingMark(int sourceID, MapPoint mapPoint) {
		this.sID = sourceID;
		this.mapPoint.setLocation(mapPoint);
	}

	@Override
	public String getTagName() {
		return "bm";
	}

	@Override
	public void initObj(Tag tag) {
		sID = tag.getParameterIntValue("sID");
		mapPoint.set(tag.getParameterIntValue("x"), tag.getParameterIntValue("y"));
	}

	@Override
	public void initTag(Tag tag) {
		tag.addParameter("sID", sID);
		tag.addParameter("x", mapPoint.x);
		tag.addParameter("y", mapPoint.y);
	}
}
